//
//  main.m
//  Demo0008
//
//  Created by zTercel on 13-1-3.
//  Copyright (c) 2013年 zTercel. All rights reserved.
//

#import <Foundation/Foundation.h>



enum Week {
    Monday = 0,
    Tuesday,
    Wendesday,
    Thursday,
    Friday,
    Saturday,
    Sunday
};

void WorkTime(enum Week week)
{
    switch (week)
    {
        case Monday:
        case Tuesday:
        case Wendesday:
        case Thursday:
        case Friday:
        case Saturday:
            NSLog(@"It's work time");
            break;
        case Sunday:
            NSLog(@"It's rest time");
            break;
    }
}

struct PersonInfo
{
    char    name[128];
    char    age;
    BOOL    sex;
};

void testMethod()
{
    struct PersonInfo ztercel = { .name = "ztercel11", .age = 28, YES };
    //strcpy(ztercel.name, "ztercel");
    NSLog(@"\nname:  %s\nage :  %d\nsex :  %s", ztercel.name, ztercel.age, ztercel.sex ? "male" : "female");
    WorkTime(Saturday);
}


int main(int argc, const char * argv[])
{

    @autoreleasepool {
        testMethod();
    }
    return 0;
}

